import service from '../utils/request'

export function fetchUserList () {
  return service({
    url: '/depart',
    method: 'get'
  })
}

export function deleteUser (params) {
  return service({
    url: `/depart/${params}`,
    method: 'delete'
  })
}

export function editUser (data) {
  return service({
    url: '/depart',
    method: 'put',
    data
  })
}

export function addUser (data) {
  return service({
    url: '/depart',
    method: 'post',
    data
  })
}